<div class="content-box">
    <div class="body-auto content-info clearfix">
        <p class="content-top-line"></p>
        <div class="content-middle">
            <div class="content-nav product-nav">
                <?php if(is_array($type_data)){
                    $say='';
                    foreach($type_data as $k=>$v){

                        if($say != $v['name']){
                            if($sub_html != ''){
                                $html = $html . '<span class="f_12">' . $sub_html . '</span></a>';
                            }
                            $html .= '<a href="#"> ' . $v['name'];
                            $sub_html = '<i onclick="open_type(\''.$v['sub_type_id'].'\')">' . $v['sub_type_name'] . '</i>';
                            $say = $v['name'];

                        }else{
                            $sub_html .= '<i onclick="open_type(\''.$v['sub_type_id'].'\')">' . $v['sub_type_name'] . '</i>';
                        }
                    }
                    if($sub_html!=''){
                        $html = $html . '<span class="f_12">' . $sub_html . '</span></a>';
                    }
                ?>

                <?php } ?>

                <?php echo $html; ?>
            </div>
            <div class="content-text">
                <ul class="product-list clearfix">
                    <?php if(is_array($info_data)){
                            foreach($info_data as $k=>$v){
                    ?>
                                <li>
                                    <a href="#" class="product-tu">
                                    <?php
                                        $url=product_img_info::model()->getProductImg($v['id']);
                                        if($url){
                                            ?>
                                    <img src="<?php echo Yii::app()->baseUrl; ?>/<?php echo $url ?>" alt="<?php echo $v['name'] ?>">
                                    <?php } ?>
                                    </a>
                                    <a href="#"><?php echo $v['type_name'].'-'.$v['sub_type_name'].'-'.$v['name'] ?></a>
                                </li>
                    <?php }} ?>

                </ul>
                <?php echo $page_list; ?>
            </div>
        </div>
        <p class="content-bottom-line"></p>
    </div>
</div>
<script type="text/javascript">
    function open_type(type_id){
        location.href=<?php echo Yii::app()->baseUrl; ?>'/product/list?sub_type_id='+type_id;
    }
</script>